package com.yiip.gmall.user.controller;


import com.yiip.gmall.beans.UmsMember;
import com.yiip.gmall.beans.UmsMemberReceiveAddress;
import com.yiip.gmall.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("/getAllUserReceiveAddress")
    public List<UmsMemberReceiveAddress> getAllUserReceiveAddress() {
        List<UmsMemberReceiveAddress> userList = userService.getAllUserReceiveAddress();
        return userList;
    }

    @RequestMapping("/getAllUser")
    public List<UmsMember> getAllUser() {
        List<UmsMember> userList = userService.getAllUser();
        return userList;
    }

    @RequestMapping("/index")
    public String index() {
        return "hello";
    }
}
